package com.yupi.model.enums;

import lombok.Getter;

@Getter
public enum TeamStatusEnums {

    PUB(0, "公开"),
    PRI(1, "私密"),
    PWD(2, "加密");

    public int value;
    public String text;

    TeamStatusEnums(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public static TeamStatusEnums getEnumByValue(Integer value) {
        if (value == null) {
            return null;
        }
        TeamStatusEnums[] values = TeamStatusEnums.values();
        for (TeamStatusEnums teamStatusEnums : values) {
            if (teamStatusEnums.getValue() == value) {
                return teamStatusEnums;
            }
        }
        return null;
    }


}
